import { defineComponent } from 'vue'
export default defineComponent({
    props:{
        title:String
    },
    setup(props,ctx){
        const {emit} = ctx
        const change = ()=>{
            console.log("---------子组件-------")
            emit("test",'就是测试')
        }
        const render = () => {
            return <>
              <p>child {props.title}</p>
              <el-button type="warning"  circle onClick={change}>点击吧</el-button>
            </>
          }
          return render
    },
    /* render(p,ctx){
        const {emit} = ctx
        console.log(ctx)
        console.log("==============")
        const change = ()=>{
            console.log("----------------")
            emit("test",'就是测试')
        }
        return (
            <div>
                {p.title}
                121212
                <el-button type="warning"  circle onClick={change}>点击吧</el-button>
            </div>
        )
    } */
})